<form action="{$action_url}" method="POST">
	<input type="hidden" name="__token__" value="{$Request.token}" />
	<div class="input-group mt10">
		<span class="input-group-addon" id="basic-addon1">会员帐号</span>
		<input type="number" name="mobile" value="{$mobile}" class="form-control" placeholder="会员/手机号" aria-describedby="basic-addon1">
	</div>

	<div class="input-group mt10">
		<span class="input-group-addon" id="basic-addon1">充值金额</span>
		<input type="number" id="recharge" name="recharge_money" class="form-control" placeholder="充值金额" aria-describedby="basic-addon1">
	</div>

	<div class="input-group mt10">
		<span class="input-group-addon" id="basic-addon1">赠送金额</span>
		<input type="number" id="give" name="give_money" class="form-control" placeholder="赠送金额" aria-describedby="basic-addon1">
	</div>
    
    <button onclick="formSubmit(this)" type="button" class="btn btn-primary btn-block mt10">充值</button>
    <a class="btn btn-default mt20 btn-block" href="{:url('back/account/detail', ['mobile'=>$mobile?$mobile:''])}" >不了，查看详情</a>
</form>

{literal}
<script>

function formSubmit(self) {
	var recharge = $('#recharge').val();
	var give = $('#give').val();

	if(recharge == '') {
		alert('请填写充值金额');
		return false;
	}

	give = give == '' ? 0 : give;

	var confirmMsg = '充值'+recharge+'元，赠送'+give+'元，确认充值？';
	
	if(!confirm(confirmMsg)) {
		return false;
	}

	$(self).parents('form').submit();
}	
</script>
{/literal}